package com.lanqiao.service.impl;

import com.lanqiao.dao.UserDao;
import com.lanqiao.dao.impl.UserDaoImpl;
import com.lanqiao.entity.UserInfo;
import com.lanqiao.service.UserSeivice;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

public class UserSeiviceImpl implements UserSeivice {
    UserDao userDao = new UserDaoImpl();



    @Override
    public List<UserInfo> selectuser(String stu_name, String date, int stu_sex) {
        List<UserInfo> list  = userDao.selectuser(stu_name,date,stu_sex);



        for (UserInfo userInfo : list) {
            Date ddd = userInfo.getTime();

            SimpleDateFormat sdf = new SimpleDateFormat("YYYY-MM-dd h:m:s");
            String dddStr = sdf.format(ddd);
            userInfo.setTime_zc(dddStr);
        }
        return list;
    }
}
